package com.lyeducation.repository;

import com.lyeducation.entities.order.OrderMaster;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @InterfaceName OrderMasterRepository
 * @Description
 * @Author Sky1in3
 * @Date 2019/1/21 11:06
 * @Version 1.0
 */
public interface OrderMasterRepository extends JpaRepository<OrderMaster, String> {
    Page<OrderMaster> findByBuyerOpenid(String buyerOpenid, Pageable pageable);

    Page<OrderMaster> findByPayStatus(int payStatusCode, Pageable pageable);

    boolean existsByBuyerOpenid(String buyerOpenid);

    List<OrderMaster> findByBuyerOpenid(String buyerOpenid);
}
